<style>
#delatnostiNasledjivanje{
	width:600px;
}
#delatnostiNasledjivanje #addChaildLayer{
	position:absolute;
	display:none;
	margin:30px 0px 0px -170px;
}
#delatnostiNasledjivanje ul{
	width:500px;
	list-style-type:none;
	padding:0px;
	margin:10px 20px;
}
#delatnostiNasledjivanje ul li{
	cursor:pointer;	
	clear:both;
	padding:2px 4px;
}
#delatnostiNasledjivanje ul li a[class],
#delatnostiNasledjivanje ul li a{
	width:16px;
	height:16px;
	overflow:hidden;
	display:block;
	float:right;
	text-decoration:none;
	padding:0px;
}
#delatnostiNasledjivanje ul li a.delete:hover{
	background:#fff url(gui/icons/delete.gif) no-repeat center center;
}
#delatnostiNasledjivanje ul li:hover{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
</style>
<div id="delatnostiNasledjivanje" class="area">
<div style="float:right">
	<input type="button" class="novi" value="dodaj" onclick="var ac=this.nextSibling.nextSibling; if(ac.style.display=='block'){ac.style.display='none'}else{ac.style.display='block'}" />
	<form id="addChaildLayer" class="area" action="javascript:void(0);" onsubmit="var p=document.getElementById('parent').value; if(p>0){LoadRSDoc('delatnosti.php?a=inherit&mod=save&child='+this.addchild.value+'&parent='+p,'afterAddDelatnostChild')}else{alert('Morate odabrati roditeljsku delatnost.')}">
		<input type="hidden" name="a" value="inherit" />
		<input type="hidden" name="mod" value="save" />
		<select name="addchild" id="addchild">
			{{%loop start del_id}}
			<option value="{{$del_id}}">{{$del_name}}</option>
			{{%loop end}}
		</select>
		<input type="submit" class="save" value="sačuvaj" />
	</form>
</div>
<h2>Nasleđivanje delatnosti</h2>
<form action="javascript:void(0)" onsubmit="submitForm(this,'delatnosti.php','POST','setContent')">
	<input type="hidden" name="a" value="inherit" />
	
	<label class="left" for="parent">Delatnost:</label>
	<select name="parent" id="parent">
		<option value="-1">---</option>
		{{%loop start del_id}}
		<option value="{{$del_id}}" {{$del_selected}}>{{$del_name}}</option>
		{{%loop end}}
	</select>
	
	<input type="submit" value="prikazi poddelatnosti" />
</form>
<br clear="all" />
{{$comment_start}}
<ul>
	{{%loop start inherit_id}}
	<li id="{{$inherit_id}}" delid="{{$inherit_child}}">
		<a href="javascript:void(0)" class="delete" onclick="if(confirm('Da li želite da obrišete delatnost&nbsp;{{$inherit_child_name}}?')){LoadRSDoc('delatnosti.php?a=inherit&mod=delete&id={{$inherit_id}}&parent={{$inherit_parent}}','afterAddDelatnostChild')}">&nbsp;</a>
		{{$inherit_child_name}}
	</li>
	{{%loop end}}
</ul>
{{$comment_end}}
</div>